class CreatePaddocks < ActiveRecord::Migration
  def change
    create_table :paddocks do |t|
      t.integer    :user_id, :null => false   # USER ID
      t.integer    :animal_id                 # Hayvonni idsi
      t.datetime   :buy_date, :null => false  # zagonni sotib olgan vaqti
      t.datetime   :feed_date                 # Hayvonni Oxirgi Boqilgan vaqti
      t.integer    :feed_interval             # Hayvonni boqish intervali secundlarda
      t.integer    :amount_of_feed, :null => false, :default => 1  # Hayvonni Ohiriga qancha ovqat sigishi, 1,2,3
      t.datetime   :product_date              # Hayvonni qachon narsa berishi tuxum shunaqa narsalar
      t.integer    :product_amount             # Product narxi monetada
      t.integer    :product_experience         # Product dan opit
      t.timestamps
    end
    add_index :paddocks, :user_id
  end
end

